import request from '../common/request';

const base = 'adminApi/role';


export async function selectRoleList(param: any) {
  return request({
    url: `${base}/selectAll`,
    method: 'post',
    data: { ...param, crypto: true },
  });
}

export async function save(param: any) {
  return request({
    url: `${base}/save`,
    method: 'post',
    data: { ...param, crypto: true },
  });
}

export async function deleteById(param: any) {
  return request({
    url: `${base}/deleteById`,
    method: 'post',
    data: { ...param, crypto: true },
  });
}

export async function deleteByIds(param: any) {
  return request({
    url: `${base}/deleteByIds`,
    method: 'post',
    data: { ...param, crypto: true },
  });
}
export async function selectAll() {
  return request({
    url: `${base}/selectAll`,
    method: 'post',
    data: { crypto: true },
  });
}

export async function selectAuthority(param: any) {
  return request({
    url: `${base}/selectAuthority`,
    method: 'post',
    data: { ...param,crypto: true },
  });
}

export async function saveRoleAuth(param: any) {
  return request({
    url: `${base}/saveRoleAuth`,
    method: 'post',
    data: { ...param,crypto: true },
  });
}
